<template>
  <el-form-item label="ID">
    <el-input v-model="selectedOptions.name" disabled />
  </el-form-item>
  <el-form-item label="name">
    <el-input v-model="selectedWidget.name" disabled />
  </el-form-item>
  <el-form-item label="选中项绑定值">
    <el-input v-model="selectedOptions.modelValue" />
  </el-form-item>
  <el-form-item label="选中状态的值">
    <el-input v-model="selectedOptions.value" />
  </el-form-item>
  <el-form-item label="多选框文本">
    <el-input v-model="selectedOptions.label" />
  </el-form-item>
  <el-form-item label="选中时的值">
    <el-input v-model="selectedOptions.trueValue" />
  </el-form-item>
  <el-form-item label="没有选中时的值">
    <el-input v-model="selectedOptions.falseValue" />
  </el-form-item>
  <el-form-item label="是否禁用">
    <el-switch v-model="selectedOptions.disabled" />
  </el-form-item>
  <el-form-item label="是否显示边框">
    <el-switch v-model="selectedOptions.border" />
  </el-form-item>
  <el-form-item label="Checkbox 的尺寸">
    <el-select v-model="selectedOptions.size" placeholder="Select">
      <el-option
        v-for="item in sizeOptions"
        :key="item.value"
        :label="item.label"
        :value="item.value"
      />
    </el-select>
  </el-form-item>
  <el-form-item label="原生 name 属性">
    <el-input v-model="selectedOptions.nameString" />
  </el-form-item>
  <el-form-item label="当前是否勾选">
    <el-switch v-model="selectedOptions.checked" />
  </el-form-item>
  <el-form-item label="设置不确定状态，仅负责样式控制">
    <el-switch v-model="selectedOptions.indeterminate" />
  </el-form-item>
  <el-form-item label="输入时是否触发表单的校验">
    <el-switch v-model="selectedOptions.validateEvent" />
  </el-form-item>
  <el-form-item label="输入框的 tabindex">
    <el-input v-model="selectedOptions.tabindex" />
  </el-form-item>
  <el-form-item label="input id">
    <el-input v-model="selectedOptions.id" />
  </el-form-item>
  <el-form-item label="当 indeterminate为 true时生效">
    <el-switch v-model="selectedOptions.controls" />
  </el-form-item>
</template>

<script setup>
defineOptions({
  name: "checkboxAttribute",
  inheritAttrs: false,
});
let $props = defineProps({
  selectedWidget: {
    type: Object,
    required: true,
  },
  selectedOptions: {
    type: Object,
    required: true,
  },
});
let sizeOptions = [
  {
    value: "large",
    label: "large",
  },
  {
    value: "default",
    label: "default",
  },
  {
    value: "small",
    label: "small",
  },
];
</script>

<style lang="scss" scoped></style>
